import React, { Component } from 'react';
import { BrowserRouter as Router, Route, Link, withRouter } from "react-router-dom";
import { Button, Select } from 'antd';
import { GithubOutlined, TwitterOutlined } from '@ant-design/icons';
import './Header.css';
import logo from './../yfim.png';

const { Option } = Select;


class Header extends Component {
    constructor(props) {
        super(props);
        this.state = {
            account: '',
        };
    }
    componentDidMount() {
    }
    handleChange(value) {

    }
    handleScroll(anchorName) {
        if (anchorName) {
            let anchorElement = document.getElementById(anchorName);
            if(anchorElement) {
                anchorElement.scrollIntoView({block: 'start', behavior: 'smooth'});
            }
        }
    }
    render() {
        return (
            <div className="head">
                <div className="logo"><img src={logo}></img></div>
                <div className="menu">
                    <ul>
                        <li><a href="#">YFI 资产</a></li>
                        <li><a onClick={() => this.handleScroll('main')}>空投活动</a></li>
                    </ul>
                </div>
                <div className="head_right">
                    <a href="#"><TwitterOutlined /></a>
                    <a href="#"><GithubOutlined /></a>
                    <Select defaultValue="1"  onChange={(value) => this.handleChange(value)}>
                      <Option value="1">简体中文</Option>
                      <Option value="2">繁体中文</Option>
                      <Option value="3">English</Option>
                    </Select>
                </div>
                <div className="clear"></div>
            </div>
        )
    }
};

export default withRouter(Header);
